package com.syg.springboot10.nacos;

import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * nacos配置
 */
@Component
public class NacosConfig {

//    @NacosValue(value = "${service.name:1}", autoRefreshed = true)
    private String serverName;

    @RequestMapping(value = "/test")
    @ResponseBody
    public String get() {
        return serverName;
    }
}
